package top.glimpse.constantcall;

import android.app.Application;
import android.content.Context;
import android.util.Log;

import com.umeng.commonsdk.UMConfigure;
import com.umeng.commonsdk.statistics.common.DeviceConfig;

public class CallApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        UMConfigure.init(this, Constants.umengAppkey, Constants.umengChannel, UMConfigure.DEVICE_TYPE_PHONE, null);
        Log.i("umeng", "umeng init");
        getTestDeviceInfo(this);
    }


    public static String[] getTestDeviceInfo(Context context){
        String[] deviceInfo = new String[2];
        try {
            if(context != null){
                deviceInfo[0] = DeviceConfig.getDeviceIdForGeneral(context);
                deviceInfo[1] = DeviceConfig.getMac(context);
                Log.i("umeng", "deviceInfo[0]" + deviceInfo[0]);
                Log.i("umeng", "deviceInfo[1]" + deviceInfo[1]);

            }
        } catch (Exception e){
        }
        return deviceInfo;
    }
}
